<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Paho C++: mqtt::iasync_client Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Paho C++
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">The Paho MQTT C++ Client Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classmqtt_1_1iasync__client.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classmqtt_1_1iasync__client-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">mqtt::iasync_client Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Enables an application to communicate with an MQTT server using non-blocking methods.  
 <a href="classmqtt_1_1iasync__client.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="iasync__client_8h_source.html">iasync_client.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for mqtt::iasync_client:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classmqtt_1_1iasync__client.png" usemap="#mqtt::iasync_client_map" alt=""/>
  <map id="mqtt::iasync_client_map" name="mqtt::iasync_client_map">
<area href="classmqtt_1_1async__client.html" title="Lightweight client for talking to an MQTT server using non-blocking methods that allow an operation t..." alt="mqtt::async_client" shape="rect" coords="0,56,113,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aee95659bed2446d0409ce33479f9cdad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aee95659bed2446d0409ce33479f9cdad"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#aee95659bed2446d0409ce33479f9cdad">qos_collection</a> = std::vector&lt; int &gt;</td></tr>
<tr class="memdesc:aee95659bed2446d0409ce33479f9cdad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type for a collection of QOS values. <br/></td></tr>
<tr class="separator:aee95659bed2446d0409ce33479f9cdad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a423bdce3b018de4597f773402f3eb360"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a423bdce3b018de4597f773402f3eb360"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a423bdce3b018de4597f773402f3eb360">~iasync_client</a> ()</td></tr>
<tr class="memdesc:a423bdce3b018de4597f773402f3eb360"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor. <br/></td></tr>
<tr class="separator:a423bdce3b018de4597f773402f3eb360"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21c51c547dbc75fcd45b5ab87523f5e1"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a21c51c547dbc75fcd45b5ab87523f5e1">connect</a> ()=0</td></tr>
<tr class="memdesc:a21c51c547dbc75fcd45b5ab87523f5e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to an MQTT server using the default options.  <a href="#a21c51c547dbc75fcd45b5ab87523f5e1">More...</a><br/></td></tr>
<tr class="separator:a21c51c547dbc75fcd45b5ab87523f5e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfe9902e93ce9e8c80f5d13049df3289"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#acfe9902e93ce9e8c80f5d13049df3289">connect</a> (<a class="el" href="classmqtt_1_1connect__options.html">connect_options</a> options)=0</td></tr>
<tr class="memdesc:acfe9902e93ce9e8c80f5d13049df3289"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to an MQTT server using the provided connect options.  <a href="#acfe9902e93ce9e8c80f5d13049df3289">More...</a><br/></td></tr>
<tr class="separator:acfe9902e93ce9e8c80f5d13049df3289"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cd5b23ef0ade37a574a82a603c07b95"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a3cd5b23ef0ade37a574a82a603c07b95">connect</a> (<a class="el" href="classmqtt_1_1connect__options.html">connect_options</a> options, void *userContext, <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;cb)=0</td></tr>
<tr class="memdesc:a3cd5b23ef0ade37a574a82a603c07b95"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to an MQTT server using the specified options.  <a href="#a3cd5b23ef0ade37a574a82a603c07b95">More...</a><br/></td></tr>
<tr class="separator:a3cd5b23ef0ade37a574a82a603c07b95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90b1e036050d0e3c9628f21bc74c5ac2"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a90b1e036050d0e3c9628f21bc74c5ac2">connect</a> (void *userContext, <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;cb)=0</td></tr>
<tr class="separator:a90b1e036050d0e3c9628f21bc74c5ac2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba2b3630f09fc47089d8487c6c6cf7cc"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#aba2b3630f09fc47089d8487c6c6cf7cc">reconnect</a> ()=0</td></tr>
<tr class="memdesc:aba2b3630f09fc47089d8487c6c6cf7cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reconnects the client using options from the previous connect.  <a href="#aba2b3630f09fc47089d8487c6c6cf7cc">More...</a><br/></td></tr>
<tr class="separator:aba2b3630f09fc47089d8487c6c6cf7cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6210f0a971f093fca297e3c8677132a"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#af6210f0a971f093fca297e3c8677132a">disconnect</a> ()=0</td></tr>
<tr class="memdesc:af6210f0a971f093fca297e3c8677132a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnects from the server.  <a href="#af6210f0a971f093fca297e3c8677132a">More...</a><br/></td></tr>
<tr class="separator:af6210f0a971f093fca297e3c8677132a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa86156916f955141d6255592c0670330"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#aa86156916f955141d6255592c0670330">disconnect</a> (<a class="el" href="classmqtt_1_1disconnect__options.html">disconnect_options</a> opts)=0</td></tr>
<tr class="memdesc:aa86156916f955141d6255592c0670330"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnects from the server.  <a href="#aa86156916f955141d6255592c0670330">More...</a><br/></td></tr>
<tr class="separator:aa86156916f955141d6255592c0670330"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afca077c741725367b9f2d2299ebe6aa8"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#afca077c741725367b9f2d2299ebe6aa8">disconnect</a> (int timeout)=0</td></tr>
<tr class="memdesc:afca077c741725367b9f2d2299ebe6aa8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnects from the server.  <a href="#afca077c741725367b9f2d2299ebe6aa8">More...</a><br/></td></tr>
<tr class="separator:afca077c741725367b9f2d2299ebe6aa8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0765c3d5b9890ec6fb732339a409489"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#af0765c3d5b9890ec6fb732339a409489">disconnect</a> (int timeout, void *userContext, <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;cb)=0</td></tr>
<tr class="memdesc:af0765c3d5b9890ec6fb732339a409489"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnects from the server.  <a href="#af0765c3d5b9890ec6fb732339a409489">More...</a><br/></td></tr>
<tr class="separator:af0765c3d5b9890ec6fb732339a409489"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0bc5689995d3755ae29d75a3e8d7a1b"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#ab0bc5689995d3755ae29d75a3e8d7a1b">disconnect</a> (void *userContext, <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;cb)=0</td></tr>
<tr class="memdesc:ab0bc5689995d3755ae29d75a3e8d7a1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnects from the server.  <a href="#ab0bc5689995d3755ae29d75a3e8d7a1b">More...</a><br/></td></tr>
<tr class="separator:ab0bc5689995d3755ae29d75a3e8d7a1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4be5917b3f0d0ed0347f50446bc034d9"><td class="memItemLeft" align="right" valign="top">virtual delivery_token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a4be5917b3f0d0ed0347f50446bc034d9">get_pending_delivery_token</a> (int msgID) const =0</td></tr>
<tr class="memdesc:a4be5917b3f0d0ed0347f50446bc034d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the delivery token for the specified message ID.  <a href="#a4be5917b3f0d0ed0347f50446bc034d9">More...</a><br/></td></tr>
<tr class="separator:a4be5917b3f0d0ed0347f50446bc034d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd75b0c39458f65ca02ec37bd8c70f5a"><td class="memItemLeft" align="right" valign="top">virtual std::vector<br class="typebreak"/>
&lt; delivery_token_ptr &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#acd75b0c39458f65ca02ec37bd8c70f5a">get_pending_delivery_tokens</a> () const =0</td></tr>
<tr class="memdesc:acd75b0c39458f65ca02ec37bd8c70f5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the delivery tokens for any outstanding publish operations.  <a href="#acd75b0c39458f65ca02ec37bd8c70f5a">More...</a><br/></td></tr>
<tr class="separator:acd75b0c39458f65ca02ec37bd8c70f5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a984c922348948b9e57f41d77a0487403"><td class="memItemLeft" align="right" valign="top">virtual string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a984c922348948b9e57f41d77a0487403">get_client_id</a> () const =0</td></tr>
<tr class="memdesc:a984c922348948b9e57f41d77a0487403"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the client ID used by this client.  <a href="#a984c922348948b9e57f41d77a0487403">More...</a><br/></td></tr>
<tr class="separator:a984c922348948b9e57f41d77a0487403"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18a9a1dba6ef043c09f49f1be75f297b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a18a9a1dba6ef043c09f49f1be75f297b"></a>
virtual string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a18a9a1dba6ef043c09f49f1be75f297b">get_server_uri</a> () const =0</td></tr>
<tr class="memdesc:a18a9a1dba6ef043c09f49f1be75f297b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the address of the server used by this client. <br/></td></tr>
<tr class="separator:a18a9a1dba6ef043c09f49f1be75f297b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c486e40ac2c91890d7ae40ef5223c92"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c486e40ac2c91890d7ae40ef5223c92"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a2c486e40ac2c91890d7ae40ef5223c92">is_connected</a> () const =0</td></tr>
<tr class="memdesc:a2c486e40ac2c91890d7ae40ef5223c92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines if this client is currently connected to the server. <br/></td></tr>
<tr class="separator:a2c486e40ac2c91890d7ae40ef5223c92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace79b81482256ee2c8bb26ad261d3a64"><td class="memItemLeft" align="right" valign="top">virtual delivery_token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#ace79b81482256ee2c8bb26ad261d3a64">publish</a> (<a class="el" href="classmqtt_1_1buffer__ref.html">string_ref</a> <a class="el" href="classmqtt_1_1topic.html">topic</a>, const void *payload, size_t n, int qos, bool retained)=0</td></tr>
<tr class="memdesc:ace79b81482256ee2c8bb26ad261d3a64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a message to a topic on the server.  <a href="#ace79b81482256ee2c8bb26ad261d3a64">More...</a><br/></td></tr>
<tr class="separator:ace79b81482256ee2c8bb26ad261d3a64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ac1db0b2d34fda55ee7304cecda87b0"><td class="memItemLeft" align="right" valign="top">virtual delivery_token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a4ac1db0b2d34fda55ee7304cecda87b0">publish</a> (<a class="el" href="classmqtt_1_1buffer__ref.html">string_ref</a> <a class="el" href="classmqtt_1_1topic.html">topic</a>, const void *payload, size_t n)=0</td></tr>
<tr class="memdesc:a4ac1db0b2d34fda55ee7304cecda87b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a message to a topic on the server.  <a href="#a4ac1db0b2d34fda55ee7304cecda87b0">More...</a><br/></td></tr>
<tr class="separator:a4ac1db0b2d34fda55ee7304cecda87b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4491592f64dd5f32c0c1ee097cd12bb7"><td class="memItemLeft" align="right" valign="top">virtual delivery_token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a4491592f64dd5f32c0c1ee097cd12bb7">publish</a> (<a class="el" href="classmqtt_1_1buffer__ref.html">string_ref</a> <a class="el" href="classmqtt_1_1topic.html">topic</a>, const void *payload, size_t n, int qos, bool retained, void *userContext, <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;cb)=0</td></tr>
<tr class="memdesc:a4491592f64dd5f32c0c1ee097cd12bb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a message to a topic on the server.  <a href="#a4491592f64dd5f32c0c1ee097cd12bb7">More...</a><br/></td></tr>
<tr class="separator:a4491592f64dd5f32c0c1ee097cd12bb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a979e6283426180926f9357b392593db2"><td class="memItemLeft" align="right" valign="top">virtual delivery_token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a979e6283426180926f9357b392593db2">publish</a> (<a class="el" href="classmqtt_1_1buffer__ref.html">string_ref</a> <a class="el" href="classmqtt_1_1topic.html">topic</a>, <a class="el" href="classmqtt_1_1buffer__ref.html">binary_ref</a> payload, int qos, bool retained)=0</td></tr>
<tr class="memdesc:a979e6283426180926f9357b392593db2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a message to a topic on the server.  <a href="#a979e6283426180926f9357b392593db2">More...</a><br/></td></tr>
<tr class="separator:a979e6283426180926f9357b392593db2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5190486cc5570afb1b01276fff3eb00"><td class="memItemLeft" align="right" valign="top">virtual delivery_token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#ac5190486cc5570afb1b01276fff3eb00">publish</a> (<a class="el" href="classmqtt_1_1buffer__ref.html">string_ref</a> <a class="el" href="classmqtt_1_1topic.html">topic</a>, <a class="el" href="classmqtt_1_1buffer__ref.html">binary_ref</a> payload)=0</td></tr>
<tr class="memdesc:ac5190486cc5570afb1b01276fff3eb00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a message to a topic on the server.  <a href="#ac5190486cc5570afb1b01276fff3eb00">More...</a><br/></td></tr>
<tr class="separator:ac5190486cc5570afb1b01276fff3eb00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a571bfa072520854502370e896bb0ce58"><td class="memItemLeft" align="right" valign="top">virtual delivery_token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a571bfa072520854502370e896bb0ce58">publish</a> (const_message_ptr msg)=0</td></tr>
<tr class="memdesc:a571bfa072520854502370e896bb0ce58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a message to a topic on the server Takes an Message message and delivers it to the server at the requested quality of service.  <a href="#a571bfa072520854502370e896bb0ce58">More...</a><br/></td></tr>
<tr class="separator:a571bfa072520854502370e896bb0ce58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a209522dfbed3c6c1ecfe59383e6138"><td class="memItemLeft" align="right" valign="top">virtual delivery_token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a0a209522dfbed3c6c1ecfe59383e6138">publish</a> (const_message_ptr msg, void *userContext, <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;cb)=0</td></tr>
<tr class="memdesc:a0a209522dfbed3c6c1ecfe59383e6138"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes a message to a topic on the server.  <a href="#a0a209522dfbed3c6c1ecfe59383e6138">More...</a><br/></td></tr>
<tr class="separator:a0a209522dfbed3c6c1ecfe59383e6138"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab02592cece3ea4f17164bf56ce7a16f2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#ab02592cece3ea4f17164bf56ce7a16f2">set_callback</a> (<a class="el" href="classmqtt_1_1callback.html">callback</a> &amp;cb)=0</td></tr>
<tr class="memdesc:ab02592cece3ea4f17164bf56ce7a16f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a callback listener to use for events that happen asynchronously.  <a href="#ab02592cece3ea4f17164bf56ce7a16f2">More...</a><br/></td></tr>
<tr class="separator:ab02592cece3ea4f17164bf56ce7a16f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a137e34c3acb046deac069cd689459447"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a137e34c3acb046deac069cd689459447"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a137e34c3acb046deac069cd689459447">disable_callbacks</a> ()=0</td></tr>
<tr class="memdesc:a137e34c3acb046deac069cd689459447"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops the callbacks. <br/></td></tr>
<tr class="separator:a137e34c3acb046deac069cd689459447"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f33a38aa1735de94207418f8e301bf1"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a8f33a38aa1735de94207418f8e301bf1">subscribe</a> (const_string_collection_ptr topicFilters, const <a class="el" href="classmqtt_1_1iasync__client.html#aee95659bed2446d0409ce33479f9cdad">qos_collection</a> &amp;qos)=0</td></tr>
<tr class="memdesc:a8f33a38aa1735de94207418f8e301bf1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subscribe to multiple topics, each of which may include wildcards.  <a href="#a8f33a38aa1735de94207418f8e301bf1">More...</a><br/></td></tr>
<tr class="separator:a8f33a38aa1735de94207418f8e301bf1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a066b6d5b25fb73cefc4fc781f081a723"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a066b6d5b25fb73cefc4fc781f081a723">subscribe</a> (const_string_collection_ptr topicFilters, const <a class="el" href="classmqtt_1_1iasync__client.html#aee95659bed2446d0409ce33479f9cdad">qos_collection</a> &amp;qos, void *userContext, <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;<a class="el" href="classmqtt_1_1callback.html">callback</a>)=0</td></tr>
<tr class="memdesc:a066b6d5b25fb73cefc4fc781f081a723"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subscribes to multiple topics, each of which may include wildcards.  <a href="#a066b6d5b25fb73cefc4fc781f081a723">More...</a><br/></td></tr>
<tr class="separator:a066b6d5b25fb73cefc4fc781f081a723"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1751d5239e48a8f9a3ed509945f85ad3"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a1751d5239e48a8f9a3ed509945f85ad3">subscribe</a> (const string &amp;topicFilter, int qos)=0</td></tr>
<tr class="memdesc:a1751d5239e48a8f9a3ed509945f85ad3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subscribe to a topic, which may include wildcards.  <a href="#a1751d5239e48a8f9a3ed509945f85ad3">More...</a><br/></td></tr>
<tr class="separator:a1751d5239e48a8f9a3ed509945f85ad3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad36b8057725242c6238113fcbaac13aa"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#ad36b8057725242c6238113fcbaac13aa">subscribe</a> (const string &amp;topicFilter, int qos, void *userContext, <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;<a class="el" href="classmqtt_1_1callback.html">callback</a>)=0</td></tr>
<tr class="memdesc:ad36b8057725242c6238113fcbaac13aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subscribe to a topic, which may include wildcards.  <a href="#ad36b8057725242c6238113fcbaac13aa">More...</a><br/></td></tr>
<tr class="separator:ad36b8057725242c6238113fcbaac13aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8df986b09325d22654cd161e8b4121f3"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a8df986b09325d22654cd161e8b4121f3">unsubscribe</a> (const string &amp;topicFilter)=0</td></tr>
<tr class="memdesc:a8df986b09325d22654cd161e8b4121f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Requests the server unsubscribe the client from a topic.  <a href="#a8df986b09325d22654cd161e8b4121f3">More...</a><br/></td></tr>
<tr class="separator:a8df986b09325d22654cd161e8b4121f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a303be54d23f0391719f8cecba42b303a"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a303be54d23f0391719f8cecba42b303a">unsubscribe</a> (const_string_collection_ptr topicFilters)=0</td></tr>
<tr class="memdesc:a303be54d23f0391719f8cecba42b303a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Requests the server unsubscribe the client from one or more topics.  <a href="#a303be54d23f0391719f8cecba42b303a">More...</a><br/></td></tr>
<tr class="separator:a303be54d23f0391719f8cecba42b303a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae90f952e58576d6a557d333bccd35e3d"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#ae90f952e58576d6a557d333bccd35e3d">unsubscribe</a> (const_string_collection_ptr topicFilters, void *userContext, <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;cb)=0</td></tr>
<tr class="memdesc:ae90f952e58576d6a557d333bccd35e3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Requests the server unsubscribe the client from one or more topics.  <a href="#ae90f952e58576d6a557d333bccd35e3d">More...</a><br/></td></tr>
<tr class="separator:ae90f952e58576d6a557d333bccd35e3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25d787395a5a26785668382930e9972d"><td class="memItemLeft" align="right" valign="top">virtual token_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iasync__client.html#a25d787395a5a26785668382930e9972d">unsubscribe</a> (const string &amp;topicFilter, void *userContext, <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;cb)=0</td></tr>
<tr class="memdesc:a25d787395a5a26785668382930e9972d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Requests the server unsubscribe the client from a topics.  <a href="#a25d787395a5a26785668382930e9972d">More...</a><br/></td></tr>
<tr class="separator:a25d787395a5a26785668382930e9972d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:ad1520136c41afff5cd24bf19d9bf76e5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad1520136c41afff5cd24bf19d9bf76e5"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>token</b></td></tr>
<tr class="separator:ad1520136c41afff5cd24bf19d9bf76e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Enables an application to communicate with an MQTT server using non-blocking methods. </p>
<p>It provides applications a simple programming interface to all features of the MQTT version 3.1 specification including:</p>
<ul>
<li>connect </li>
<li>publish </li>
<li>subscribe </li>
<li>unsubscribe </li>
<li>disconnect </li>
</ul>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a21c51c547dbc75fcd45b5ab87523f5e1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::connect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Connects to an MQTT server using the default options. </p>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the connect to complete. The token will be passed to any callback that has been set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">exception</td><td>for non security related problems </td></tr>
    <tr><td class="paramname"><a class="el" href="classmqtt_1_1security__exception.html" title="Thrown when a client is not authorized to perform an operation, or if there is a problem with the sec...">security_exception</a></td><td>for security related problems </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#aee06a4438b2075de021bbf8d5b6b0c33">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="acfe9902e93ce9e8c80f5d13049df3289"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::connect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1connect__options.html">connect_options</a>&#160;</td>
          <td class="paramname"><em>options</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Connects to an MQTT server using the provided connect options. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">options</td><td>a set of connection parameters that override the defaults. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the connect to complete. The token will be passed to any callback that has been set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">exception</td><td>for non security related problems </td></tr>
    <tr><td class="paramname"><a class="el" href="classmqtt_1_1security__exception.html" title="Thrown when a client is not authorized to perform an operation, or if there is a problem with the sec...">security_exception</a></td><td>for security related problems </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#af4546820d1ee0426c2964327c6d654a0">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a3cd5b23ef0ade37a574a82a603c07b95"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::connect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1connect__options.html">connect_options</a>&#160;</td>
          <td class="paramname"><em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;&#160;</td>
          <td class="paramname"><em>cb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Connects to an MQTT server using the specified options. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">options</td><td>a set of connection parameters that override the defaults. </td></tr>
    <tr><td class="paramname">userContext</td><td>optional object used to pass context to the callback. Use <em>nullptr</em> if not required. </td></tr>
    <tr><td class="paramname">cb</td><td>callback listener that will be notified when the connect completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the connect to complete. The token will be passed to any callback that has been set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">exception</td><td>for non security related problems </td></tr>
    <tr><td class="paramname"><a class="el" href="classmqtt_1_1security__exception.html" title="Thrown when a client is not authorized to perform an operation, or if there is a problem with the sec...">security_exception</a></td><td>for security related problems </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a6599c1a530dda9fa66effb0d706d6795">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a90b1e036050d0e3c9628f21bc74c5ac2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::connect </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;&#160;</td>
          <td class="paramname"><em>cb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">userContext</td><td>optional object used to pass context to the callback. Use <em>nullptr</em> if not required. </td></tr>
    <tr><td class="paramname">cb</td><td>listener that will be notified when the connect completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the connect to complete. The token will be passed to any callback that has been set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">exception</td><td>for non security related problems </td></tr>
    <tr><td class="paramname"><a class="el" href="classmqtt_1_1security__exception.html" title="Thrown when a client is not authorized to perform an operation, or if there is a problem with the sec...">security_exception</a></td><td>for security related problems </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#ae68c924e65104b40488cba072597baeb">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="af6210f0a971f093fca297e3c8677132a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::disconnect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Disconnects from the server. </p>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the disconnect to complete. The token will be passed to any callback that has been set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">exception</td><td>for problems encountered while disconnecting </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a376960f9e1fbe5e40136f2f07b22d780">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="aa86156916f955141d6255592c0670330"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::disconnect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1disconnect__options.html">disconnect_options</a>&#160;</td>
          <td class="paramname"><em>opts</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Disconnects from the server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>Options for disconnecting. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the disconnect to complete. The token will be passed to any callback that has been set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">exception</td><td>for problems encountered while disconnecting </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a2d6e9ada464133778f0154da32eefc61">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="afca077c741725367b9f2d2299ebe6aa8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::disconnect </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeout</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Disconnects from the server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">timeout</td><td>the amount of time in milliseconds to allow for existing work to finish before disconnecting. A value of zero or less means the client will not quiesce. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the disconnect to complete. The token will be passed to any callback that has been set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">exception</td><td>for problems encountered while disconnecting </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a56ccd6989f8839a35954776de682a29b">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="af0765c3d5b9890ec6fb732339a409489"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::disconnect </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeout</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;&#160;</td>
          <td class="paramname"><em>cb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Disconnects from the server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">timeout</td><td>the amount of time in milliseconds to allow for existing work to finish before disconnecting. A value of zero or less means the client will not quiesce. </td></tr>
    <tr><td class="paramname">userContext</td><td>optional object used to pass context to the callback. Use <em>nullptr</em> if not required. </td></tr>
    <tr><td class="paramname">cb</td><td>listener that will be notified when the disconnect completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the disconnect to complete. The token will be passed to any callback that has been set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">exception</td><td>for problems encountered while disconnecting </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#aa7cd2e2e1281312273ea0a5f18607f03">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="ab0bc5689995d3755ae29d75a3e8d7a1b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::disconnect </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;&#160;</td>
          <td class="paramname"><em>cb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Disconnects from the server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">userContext</td><td>optional object used to pass context to the callback. Use <em>nullptr</em> if not required. </td></tr>
    <tr><td class="paramname">cb</td><td>listener that will be notified when the disconnect completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the disconnect to complete. The token will be passed to any callback that has been set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">exception</td><td>for problems encountered while disconnecting </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#adf9676f95c8b6c1b4a605d5fd8b8c251">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a984c922348948b9e57f41d77a0487403"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual string mqtt::iasync_client::get_client_id </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the client ID used by this client. </p>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a8105627f112a23e5c8067901cf1650a2">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a4be5917b3f0d0ed0347f50446bc034d9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual delivery_token_ptr mqtt::iasync_client::get_pending_delivery_token </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>msgID</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the delivery token for the specified message ID. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classmqtt_1_1delivery__token.html" title="Provides a mechanism to track the delivery progress of a message. ">delivery_token</a> </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#adac62c2c80ed3a1c32582b97e6e357ed">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="acd75b0c39458f65ca02ec37bd8c70f5a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::vector&lt;delivery_token_ptr&gt; mqtt::iasync_client::get_pending_delivery_tokens </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the delivery tokens for any outstanding publish operations. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classmqtt_1_1delivery__token.html" title="Provides a mechanism to track the delivery progress of a message. ">delivery_token</a>[] </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#aec00d760cb3a6db6ac633c48365207d5">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="ace79b81482256ee2c8bb26ad261d3a64"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual delivery_token_ptr mqtt::iasync_client::publish </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1buffer__ref.html">string_ref</a>&#160;</td>
          <td class="paramname"><em>topic</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>payload</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>qos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>retained</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Publishes a message to a topic on the server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">topic</td><td>The topic to deliver the message to </td></tr>
    <tr><td class="paramname">payload</td><td>the bytes to use as the message payload </td></tr>
    <tr><td class="paramname">n</td><td>the number of bytes in the payload </td></tr>
    <tr><td class="paramname">qos</td><td>the Quality of Service to deliver the message at. Valid values are 0, 1 or 2. </td></tr>
    <tr><td class="paramname">retained</td><td>whether or not this message should be retained by the server. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the publish to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a7fa8d3dd5b88a5643dcd28e5069da8a5">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a4ac1db0b2d34fda55ee7304cecda87b0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual delivery_token_ptr mqtt::iasync_client::publish </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1buffer__ref.html">string_ref</a>&#160;</td>
          <td class="paramname"><em>topic</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>payload</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>n</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Publishes a message to a topic on the server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">topic</td><td>The topic to deliver the message to </td></tr>
    <tr><td class="paramname">payload</td><td>the bytes to use as the message payload </td></tr>
    <tr><td class="paramname">n</td><td>the number of bytes in the payload </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the publish to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a425e5e48369a523378b6c92de7bf4b85">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a4491592f64dd5f32c0c1ee097cd12bb7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual delivery_token_ptr mqtt::iasync_client::publish </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1buffer__ref.html">string_ref</a>&#160;</td>
          <td class="paramname"><em>topic</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>payload</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>qos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>retained</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;&#160;</td>
          <td class="paramname"><em>cb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Publishes a message to a topic on the server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">topic</td><td>The topic to deliver the message to </td></tr>
    <tr><td class="paramname">payload</td><td>the bytes to use as the message payload </td></tr>
    <tr><td class="paramname">n</td><td>the number of bytes in the payload </td></tr>
    <tr><td class="paramname">qos</td><td>the Quality of Service to deliver the message at. Valid values are 0, 1 or 2. </td></tr>
    <tr><td class="paramname">retained</td><td>whether or not this message should be retained by the server. </td></tr>
    <tr><td class="paramname">userContext</td><td>optional object used to pass context to the callback. Use <em>nullptr</em> if not required. </td></tr>
    <tr><td class="paramname">cb</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the publish to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a3a8b3e11497b2aa1204f1ca380e81490">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a979e6283426180926f9357b392593db2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual delivery_token_ptr mqtt::iasync_client::publish </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1buffer__ref.html">string_ref</a>&#160;</td>
          <td class="paramname"><em>topic</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1buffer__ref.html">binary_ref</a>&#160;</td>
          <td class="paramname"><em>payload</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>qos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>retained</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Publishes a message to a topic on the server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">topic</td><td>The topic to deliver the message to </td></tr>
    <tr><td class="paramname">payload</td><td>the bytes to use as the message payload </td></tr>
    <tr><td class="paramname">qos</td><td>the Quality of Service to deliver the message at. Valid values are 0, 1 or 2. </td></tr>
    <tr><td class="paramname">retained</td><td>whether or not this message should be retained by the server. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the publish to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#afcb723eb44fccf64e18b2a25acd938b5">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="ac5190486cc5570afb1b01276fff3eb00"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual delivery_token_ptr mqtt::iasync_client::publish </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1buffer__ref.html">string_ref</a>&#160;</td>
          <td class="paramname"><em>topic</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1buffer__ref.html">binary_ref</a>&#160;</td>
          <td class="paramname"><em>payload</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Publishes a message to a topic on the server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">topic</td><td>The topic to deliver the message to </td></tr>
    <tr><td class="paramname">payload</td><td>the bytes to use as the message payload </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the publish to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a804df67eff69884958d897294194a351">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a571bfa072520854502370e896bb0ce58"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual delivery_token_ptr mqtt::iasync_client::publish </td>
          <td>(</td>
          <td class="paramtype">const_message_ptr&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Publishes a message to a topic on the server Takes an Message message and delivers it to the server at the requested quality of service. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msg</td><td>the message to deliver to the server </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the publish to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#af1dbbe800b37c395e45aeb5ddd725ffd">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a0a209522dfbed3c6c1ecfe59383e6138"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual delivery_token_ptr mqtt::iasync_client::publish </td>
          <td>(</td>
          <td class="paramtype">const_message_ptr&#160;</td>
          <td class="paramname"><em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;&#160;</td>
          <td class="paramname"><em>cb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Publishes a message to a topic on the server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msg</td><td>the message to deliver to the server </td></tr>
    <tr><td class="paramname">userContext</td><td>optional object used to pass context to the callback. Use <em>nullptr</em> if not required. </td></tr>
    <tr><td class="paramname">cb</td><td>optional listener that will be notified when message delivery has completed to the requested quality of service </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the publish to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a06ce15b7a304e7f091db2642308a91e2">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="aba2b3630f09fc47089d8487c6c6cf7cc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::reconnect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reconnects the client using options from the previous connect. </p>
<p>The client must have previously called <a class="el" href="classmqtt_1_1iasync__client.html#a21c51c547dbc75fcd45b5ab87523f5e1" title="Connects to an MQTT server using the default options. ">connect()</a> for this to work. </p>
<dl class="section return"><dt>Returns</dt><dd>token used to track the progress of the reconnect. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a93cad44caab9aa829745477b170eae3d">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="ab02592cece3ea4f17164bf56ce7a16f2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void mqtt::iasync_client::set_callback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1callback.html">callback</a> &amp;&#160;</td>
          <td class="paramname"><em>cb</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets a callback listener to use for events that happen asynchronously. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cb</td><td>callback which will be invoked for certain asynchronous events </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a8b09cc4d4788420926725b7df00d3448">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a8f33a38aa1735de94207418f8e301bf1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::subscribe </td>
          <td>(</td>
          <td class="paramtype">const_string_collection_ptr&#160;</td>
          <td class="paramname"><em>topicFilters</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classmqtt_1_1iasync__client.html#aee95659bed2446d0409ce33479f9cdad">qos_collection</a> &amp;&#160;</td>
          <td class="paramname"><em>qos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Subscribe to multiple topics, each of which may include wildcards. </p>
<p>Provides an optimized way to subscribe to multiple topics compared to subscribing to each one individually. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">topicFilters</td><td>one or more topics to subscribe to, which can include wildcards </td></tr>
    <tr><td class="paramname">qos</td><td>the maximum quality of service at which to subscribe. Messages published at a lower quality of service will be received at the published QoS. Messages published at a higher quality of service will be received using the QoS specified on the subscribe. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the subscribe to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a8b20a22af1069ef41c27566698bd90bd">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a066b6d5b25fb73cefc4fc781f081a723"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::subscribe </td>
          <td>(</td>
          <td class="paramtype">const_string_collection_ptr&#160;</td>
          <td class="paramname"><em>topicFilters</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classmqtt_1_1iasync__client.html#aee95659bed2446d0409ce33479f9cdad">qos_collection</a> &amp;&#160;</td>
          <td class="paramname"><em>qos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;&#160;</td>
          <td class="paramname"><em>callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Subscribes to multiple topics, each of which may include wildcards. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">topicFilters</td><td>one or more topics to subscribe to, which can include wildcards </td></tr>
    <tr><td class="paramname">qos</td><td>the maximum quality of service at which to subscribe. Messages published at a lower quality of service will be received at the published QoS. Messages published at a higher quality of service will be received using the QoS specified on the subscribe. </td></tr>
    <tr><td class="paramname">userContext</td><td>optional object used to pass context to the callback. Use <em>nullptr</em> if not required. </td></tr>
    <tr><td class="paramname">callback</td><td>listener that will be notified when subscribe has completed </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the subscribe to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a001340b074ef676bee012156dde830a1">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a1751d5239e48a8f9a3ed509945f85ad3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::subscribe </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>topicFilter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>qos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Subscribe to a topic, which may include wildcards. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">topicFilter</td><td>the topic to subscribe to, which can include wildcards. </td></tr>
    <tr><td class="paramname">qos</td><td>the maximum quality of service at which to subscribe. Messages published at a lower quality of service will be received at the published QoS. Messages published at a higher quality of service will be received using the QoS specified on the subscribe. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the subscribe to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#ab250f9c6d9c8afd85c6e2038e640116f">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="ad36b8057725242c6238113fcbaac13aa"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::subscribe </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>topicFilter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>qos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;&#160;</td>
          <td class="paramname"><em>callback</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Subscribe to a topic, which may include wildcards. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">topicFilter</td><td>the topic to subscribe to, which can include wildcards. </td></tr>
    <tr><td class="paramname">qos</td><td>the maximum quality of service at which to subscribe. Messages published at a lower quality of service will be received at the published QoS. Messages published at a higher quality of service will be received using the QoS specified on the subscribe. </td></tr>
    <tr><td class="paramname">userContext</td><td>optional object used to pass context to the callback. Use <em>nullptr</em> if not required. </td></tr>
    <tr><td class="paramname">callback</td><td>listener that will be notified when subscribe has completed </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the subscribe to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a0c1a7a708c40ebaf10ed8488c5557227">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a8df986b09325d22654cd161e8b4121f3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::unsubscribe </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>topicFilter</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Requests the server unsubscribe the client from a topic. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">topicFilter</td><td>the topic to unsubscribe from. It must match a topicFilter specified on an earlier subscribe. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the unsubscribe to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#ae709e53471db54ec614bcc9d8978361e">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a303be54d23f0391719f8cecba42b303a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::unsubscribe </td>
          <td>(</td>
          <td class="paramtype">const_string_collection_ptr&#160;</td>
          <td class="paramname"><em>topicFilters</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Requests the server unsubscribe the client from one or more topics. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">topicFilters</td><td>one or more topics to unsubscribe from. Each topicFilter must match one specified on an earlier subscribe. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the unsubscribe to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#afff45a1d3c206dfddbea1940ae139711">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="ae90f952e58576d6a557d333bccd35e3d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::unsubscribe </td>
          <td>(</td>
          <td class="paramtype">const_string_collection_ptr&#160;</td>
          <td class="paramname"><em>topicFilters</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;&#160;</td>
          <td class="paramname"><em>cb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Requests the server unsubscribe the client from one or more topics. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">topicFilters</td><td>one or more topics to unsubscribe from. Each topicFilter must match one specified on an earlier subscribe. </td></tr>
    <tr><td class="paramname">userContext</td><td>optional object used to pass context to the callback. Use <em>nullptr</em> if not required. </td></tr>
    <tr><td class="paramname">cb</td><td>listener that will be notified when unsubscribe has completed </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the unsubscribe to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a54d438ed68ccc28835d66097e87f0825">mqtt::async_client</a>.</p>

</div>
</div>
<a class="anchor" id="a25d787395a5a26785668382930e9972d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual token_ptr mqtt::iasync_client::unsubscribe </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>topicFilter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userContext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &amp;&#160;</td>
          <td class="paramname"><em>cb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Requests the server unsubscribe the client from a topics. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">topicFilter</td><td>the topic to unsubscribe from. It must match a topicFilter specified on an earlier subscribe. </td></tr>
    <tr><td class="paramname">userContext</td><td>optional object used to pass context to the callback. Use <em>nullptr</em> if not required. </td></tr>
    <tr><td class="paramname">cb</td><td>listener that will be notified when unsubscribe has completed </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>token used to track and wait for the unsubscribe to complete. The token will be passed to callback methods if set. </dd></dl>

<p>Implemented in <a class="el" href="classmqtt_1_1async__client.html#a75f8e6088b58af227b576153471da7ca">mqtt::async_client</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/mqtt/<a class="el" href="iasync__client_8h_source.html">iasync_client.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>mqtt</b></li><li class="navelem"><a class="el" href="classmqtt_1_1iasync__client.html">iasync_client</a></li>
    <li class="footer">Generated on Sun Jul 23 2017 10:24:30 for Paho C++ by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
